package net.maku.newbase;

/**
 * 返回信息字典
 *
 * @author JYL
 * @date 2022/6/28 12:11
 */
public enum RE {
    /*
    1**** : 系统级别
    2**** : 业务级别
    3**** : 数据库级别
    4**** : 第三方级别
     */
    UNKNOWN_ABNORMAL("未知异常，请联系管理员", 10001),
    TOKEN_DISABLED("令牌失效", 10101),

    INFORMATION_LOSS("信息丢失", 20011),
    ORDER_GRAB_FAIL("抢单失败", 20101),
    ORDER_CANCELGRAB_FAIL("退单失败", 20102),
    POWER_CANNOT("无此业务的操作权限", 20200),
    AUDIT_CANNOT("不能审核", 20201),

    PARAM_ERR("参数异常", 30001),
    PRIMARY_KEY("主键冲突", 30100),
    PERR_PARENTID("缺少父ID", 30101),

    UNAUTHORIZED("未授权", 40001),

    ERR("缺省置底-无意义", 99999);

    /**
     * 提示信息
     */
    private String msg;
    /**
     * 错误编码
     */
    private Integer code;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    RE(String msg, int code) {
        this.msg = msg;
        this.code = code;
    }
}
